package com.lp;

import cn.hutool.extra.spring.SpringUtil;
import com.lp.canal.CanalHandler;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * @author 10263
 */
@SpringBootApplication
@EnableAsync
@Import(cn.hutool.extra.spring.SpringUtil.class)
public class Application implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Override
    public void run(String... args) {
        SpringUtil.getBean(CanalHandler.class).initialize();
    }

}
